<template>
    <div class="app-container">
        <van-nav-bar title="历史战绩"  left-arrow @click-left="handleBack" />
        <div class="hisroty-container">
            <div class="history-title">关注公众号：惊鸿量化研习社<span style="margin-left: 10px;" data-clipboard-text="惊鸿量化研习社"  id="copyUrl" class="maincolor">复制</span></div>
            <div class="history-title">关注币安：量化AG-Grt0104<span style="margin-left: 10px;" data-clipboard-text="量化AG-Grt0104"  id="copyUrl" class="maincolor">复制</span></div>

            <div class="history-title mt20">
                <p>关注微博查看每天的信号战绩</p>
                <p class="maincolor"><a href="https://weibo.com/u/7671325327" target="_blank">微博小号：https://weibo.com/u/7671325327</a></p>
                <p class="maincolor"><a href="https://weibo.com/u/7646525795" target="_blank">微博大号：https://weibo.com/u/7646525795</a></p>
                
            </div>
            <van-image
                class="pic"
                width="100%"
                @click="handlepreview(0)"
                :src="images[0]"
            />
            <van-image
                class="pic"
                width="100%"
                @click="handlepreview(1)"
                :src="images[1]"
            />
            <van-image
                class="pic"
                width="100%"
                @click="handlepreview(2)"
                :src="images[2]"
            />
            <!-- <img class="pic" src="https://www.aiaabiok.com/imgs/wx/btc.png" alt="">
            <img class="pic" src="https://www.aiaabiok.com/imgs/wx/eth.png" alt=""> -->
            <div class="kefu-tip" style="margin-top: 0;">了解更多<span class="maincolor" @click="$router.push('/setting/kefu')">联系客服</span></div> 
        </div>
    

    </div>
</template>

<script>
import ClipboardJS from 'clipboard';
import { showToast, showSuccessToast } from 'vant';
import { showImagePreview } from 'vant';
export default {
    name: 'HistorySilent',
    props: {},
    data() {
        return {
            images: [
                'https://www.aiaabiok.com/imgs/wx/btc.png',
                'https://www.aiaabiok.com/imgs/wx/eth.png',
                'https://www.aiaabiok.com/imgs/wx/gongzhong.png',
            ],
            type: 'inner',
            src: 'https://www.aiaabiok.com/wx.jpg?t=1708614661132',
            currentItem: {},
            historyList: [
                {
                    date: '2024-02-26',
                    url: 'https://weibo.com/7671325327/O2ks127vo', // 微博链接
                    imgs: [
                        'https://www.aiaabiok.com/imgs/2024-02-26/01.jpg',
                        'https://www.aiaabiok.com/imgs/2024-02-26/02.jpg',
                    ],
                },
                {
                    date: '2024-02-25',
                    url: 'https://weibo.com/7671325327/O2aNMhUXy', // 微博链接
                    imgs: [
                        'https://www.aiaabiok.com/imgs/2024-02-25/01.jpg',
                        'https://www.aiaabiok.com/imgs/2024-02-25/02.jpg',
                    ],
                },
                {
                    date: '2024-02-24',
                    url: 'https://weibo.com/7671325327/O22FMz5Dn', // 微博链接
                    imgs: [
                        'https://www.aiaabiok.com/imgs/2024-02-24/01.jpg',
                        'https://www.aiaabiok.com/imgs/2024-02-24/02.jpg',
                        'https://www.aiaabiok.com/imgs/2024-02-24/03.jpg',
                    ],
                },
                
                // {
                //     date: '2024-02-23',
                //     url: 'https://weibo.com/7671325327/O2aNMhUXy', // 微博链接
                //     imgs: [
                //         'https://www.aiaabiok.com/imgs/2024-02-23/01.jpg',
                //         'https://www.aiaabiok.com/imgs/2024-02-23/02.jpg',
                //     ],
                // },
                // {
                //     date: '2024-02-22',
                //     url: 'https://weibo.com/7671325327/O2aNMhUXy', // 微博链接
                //     imgs: [
                //         'https://www.aiaabiok.com/imgs/2024-02-25/01.jpg',
                //         'https://www.aiaabiok.com/imgs/2024-02-25/02.jpg',
                //     ],
                // },
                // {
                //     date: '2024-02-21',
                //     url: 'https://weibo.com/7671325327/O1DBlmqdF', // 微博链接
                //     imgs: [
                //         'https://www.aiaabiok.com/imgs/2024-02-21/01.jpg',
                //         'https://www.aiaabiok.com/imgs/2024-02-21/02.jpg',
                //         'https://www.aiaabiok.com/imgs/2024-02-21/03.jpg',
                //         'https://www.aiaabiok.com/imgs/2024-02-21/04.jpg',
                //     ],
                // },
                // {
                //     date: '2024-02-20',
                //     url: 'https://weibo.com/7671325327/O1rcuamVB', // 微博链接
                //     imgs: [
                //         'https://www.aiaabiok.com/imgs/2024-02-20/01.jpg',
                //         'https://www.aiaabiok.com/imgs/2024-02-20/02.jpg',
                //     ],
                // },

                
            ]
        };
    },
    components: { },
    created() {
        this.currentItem = this.historyList[0];
        this.type = this.$route.query.type;
        this.setCopy();
    },
    computed: {},
    methods: {
        setCopy() {
            let clipborad = new ClipboardJS('#copyUrl');
            //复制成功
            clipborad.on('success', function () {
                showSuccessToast('复制成功');
            });
            //复制失败
            clipborad.on('error', function () {
                showToast('复制失败');
            });
        },
        handlepreview(index) {
            showImagePreview({
                images: this.images,
                startPosition: index,
                closeable: true,
            });
        },
        handleOpen() {
            window.open(this.currentItem.url);
        },
        handleBack() {
            if (this.type === 'inner') {
                this.$router.back();
            } else {
                window.open('https://www.aiaabiok.com')
            }
        },
        handleRefresh() {
            this.src = this.src + `?t=${new Date().getTime()}`
        }
    },
};
</script>
<style lang="less" scoped>
.pic {
    width: 100%;
    max-width: 600px;
    min-height: 100px;
    margin: 20px 0;
}
.hisroty-container {
    padding: 16px;
    font-size: 14px;
}

.history-title {
    font-weight: 500;
    font-size: 14px;
}
.img-container {
    img {
        display: block;
        margin-bottom: 20px;
        max-width: 100%;
    }
}
</style>
